Repository navigation
fix(plugin-auth)!: the settings save keeps a way to sign in under the local sign-in path off, and a blocked client lands on the sign-in page from the direct sign-in door - #33781
Conversation
…what the page offers under the local sign-in path off Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSSVaNcDs8HPSoGV6V
…gn-in door lands on the sign-in page with the refusal code Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSSVaNcDs8HPSoGV6V
…-in door, and the sign-out note is read only on the provider's return Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSSVaNcDs8HPSoGV6V
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSSVaNcDs8HPSoGV6V
📓 Docs Drift CheckThis PR changes 1 package(s): 5 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 2 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 22 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin a7c464d4054d2437e7f2b4005d913e9d3000236a && git checkout a7c464d4054d2437e7f2b4005d913e9d3000236a
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 6ec7b93c28ddbd80483fcb4e878ca2bea6a316db e25b4e31a6be0e0cc5aca0fcae4a0779a678dd84 && git checkout -B drift-repro 6ec7b93c28ddbd80483fcb4e878ca2bea6a316db && git merge --no-ff e25b4e31a6be0e0cc5aca0fcae4a0779a678dd84
node scripts/docs-audit/affected-docs.mjs --json 6ec7b93c28ddbd80483fcb4e878ca2bea6a316db
|
|
domain:server#5 · zhuangjianguo · session_01QsR2jVPGBoi3MCGoKbW1Hv Request: review · PR #33781 · S1/A1 · Fixes #33358 · head 10180db · 2026-11-15T10:42Z Reviewer: review-a of seat |
|
domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM |
|
domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM Review — FAILHead-sha: What holds
Must-fix
Should-fix (fold into the same round)
Nits (no re-review needed)
Gates: not judged. At review time 25 check-runs were in progress, 32 success, 9 skipped, none red. Next: a new head with items 1–4. I review the delta, and the contract-review record is written at that head. |
…orce, door path check, docs 302 Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSSVaNcDs8HPSoGV6V
|
domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM Contract reviewServed-tier: Read: card #33358 with its ten comments, PR #33781's body, file list and five comments, and the net diff against the merge's main parent Check-runs on this head: 72, of which 61 success and 11 skipped, none failed, none still running when this was written (12:02Z). A second ① Derived judgmentsNo must-fix. Each answer the diff moves, against
S1 (should-fix) — one moved answer is undeclared, and the changeset calls it unchanged
② Semver level
③ Boundary flags
④ Design judgmentThe settings save makes the floor's own refusal real. It takes no declared capability away.
The blocked door keeps the allow-list's refusal whole and changes only its shape for one navigation.
Nits (none blocks).
S1 is open on this head. It earns a delta review of its fix before this PR lands. Implemented-by: VERDICT: PASS |
|
domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM Review — FAIL (delta; one prose-only should-fix open)Head-sha: Items of 6893256448, all closed at this head
Contract review ( Open (should-fix, prose faces only, no source line moves)
Nits, follow-ups, not this PR: N1 the spec sentence "It changes no server door" for Gates: at 12:02Z, 72 check-runs on this head: 61 success, 11 skipped, none failed. Brief given to the at-tier reviewerBrief: — PR #33781 @ You review at Inputs — these and nothing else: Scope — the narrowing is declared of the whole PR, never of a path: the floor is EVERY path of the diff outside the ⛔ READ-ONLY. No worktree, no checkout, no build, no test run, no gate re-run, no ablation: the check-runs Judge, in the record's own sections: |
…se in force as widened Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSSVaNcDs8HPSoGV6V
|
domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM |
|
domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM Contract reviewServed-tier: This is the delta review of Check-runs on this head at 12:10Z: 68, of which 14 success, 11 skipped and 43 still in progress, none failed. The in-progress runs include Test Core 1-8, Test UI 1-16, Build Core, Build Docs, the type-check and lint lanes, Live E2E UI and ① Derived judgmentsS1 (should-fix): closed. Each sentence was checked against the tree at
No source, test or locale file moved. No new should-fix. ② Semver levelUnchanged from 6894038792, and the one gap named there is closed. The bump lines, the title, the ③ Boundary flagsUnchanged from 6894038792. The delta touches no ④ Design judgmentUnchanged from 6894038792, since no reviewed line moved. Nits N1 to N4 there still stand, and none blocks. Nits (none blocks).
Implemented-by: VERDICT: PASS |
|
domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM Review — PASSHead-sha:
Gates not judged: at 12:10Z, 43 of 68 check-runs were still in progress, 14 success, 11 skipped, none failed. Landing needs every check green on this head. This PR is |
|
domain:server#5 · zhuangjianguo · session_01QsR2jVPGBoi3MCGoKbW1Hv 席位核对 · ACCEPT · Head-sha: e25b4e3 · 2026-11-15T12:57Z
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 43716571017 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
domain:server#5 · zhuangjianguo · session_01QsR2jVPGBoi3MCGoKbW1Hv Re-arm · 2026-11-15T13:21Z · head e25b4e3 unchanged; ACCEPT 6894669076 stands The PR was removed from the merge queue at 2026-11-15T13:14Z. Queue duty (review-a) classed it as a FLAKE. The one red test was in merge_group run 43716571017, Test Core (2/8): |
Requested by Steedos · project thread
Fixes #33358
Clause-②: yes (narrowing) — narrowed: with direct sign-in on and its local sign-in path
off, an auth settings save (PUT /api/settings/auth) that turns Google off, or clears a Google client credential no environment variable backs, while Google is the last way in the sign-in page offers answers400 SETTINGS_VALIDATION(copygoogleLocalOff) and saves nothing, where it saved, even with email and password or phone sign-in on; and aGET /api/v1/auth/sign-in/directfrom a client the IP allow-list refuses answers302to/login?error=IP_NOT_ALLOWED, where it answered the403 IP_NOT_ALLOWEDJSON body. Widened: underoffwith nothing else in force (no Google, no identity provider row, no social or OIDC provider with credentials, no host sign-in handoff), a save ofemail_password_enabled: falseanswers200and saves, where it answered400 SETTINGS_VALIDATION, because the sign-in page offers no email and password there either way; module exports (not on the package entry)DIRECT_SIGN_IN_NETWORK_REFUSED,isDirectSignInDoorNavigationanddirectSignInNetworkRefusal; the copy keygoogleLocalOffin all 11 locales; the@object-ui/i18nkeyauth.login.errors.networkNotAllowedin all 11 packs (no key renamed or removed);markSignOutRoundTriptakes the sign-in page path it records.Metadata-protocol: none
Skills-docs: none — no skill under
skills/**teaches direct sign-in, the auth settings save, the IP allow-list or the sign-out note;content/docs/permissions/sso.mdxgains the rules in this change.维护者速读
cd packages/plugins/plugin-auth && pnpm exec vitest run src/sign-in-method-floor.test.ts src/direct-sign-in.test.ts,预期全部通过,其中新加的 off 场景用例与 IP 白名单用例都在列。What changes
Item 1, the settings-save half (N7).
signInMethodFloorPredicatenow judges by what the sign-in page offers, through the samepageOffersLocalSignInthe provider delete and the boot report use since #33623. UnderdirectSignIn.localSignIn: 'off':google_*change that removes the last way in (Google off, or a client credential cleared that no env variable backs) is refused400 SETTINGS_VALIDATIONat its key with email and password ON, in a newgoogleLocalOffcopy in all eleven languages of the existing table (the email-off copy's remedy, keep email and password on, does nothing there); turning email and password on in the same save does not help;email_password_enabledkey itself is never refused underoff, because the page draws it neither way, so the save removes nothing the page offers. With nothing else in force this widens an answer:email_password_enabled: falsewas400on main and is now200(declared under Widened). Recovery after such a save needsOS_AUTH_EMAIL_PASSWORD_ENABLED=trueas well asOS_AUTH_DIRECT_SIGN_IN_LOCAL_PATH=hidden, then a restart;asThePageOffers: true), as on the other two doors.Under
hidden, or with direct sign-in off, every answer is as on main (thelocalOfferedleg is true there).Copy nit folded in:
enterpriseSsoUnverified(the503on a provider delete whose provider list could not be read) said "with email and password off"; it now says the sign-in page offers no email and password, which is true under both reasons the check runs. All eleven languages.content/docs/permissions/sso.mdxno longer says the settings save is still open, and names the three checks and the exits that still count.Item 2 (N8), the direct sign-in door under the IP allow-list. The allow-list middleware in
auth-plugin.ts(one hunk, disjoint from #33268's) still refuses, audits and logs exactly as before. For a GET of the mounted door only, its answer is now302to the Console's/login?error=IP_NOT_ALLOWEDwith the page's?redirect=carried (directSignInNetworkRefusalindirect-sign-in.ts, reusingcarriedRedirect/keptReturnPath), instead of the raw403JSON. No exemption: the request never reaches the door, nothing is started, no provider is read, and every other auth request from that client (/get-session,/sign-in/social, a POST to the door path, the door path with a trailing slash) is still403 IP_NOT_ALLOWED. With direct sign-in off the path is not mounted and the answer is the403as before. The page holds on anyerroralready;ssoCallbackRefusal.tsgainsIP_NOT_ALLOWEDwith the new@object-ui/i18nkeyauth.login.errors.networkNotAllowedin all eleven packs (zh-Hant generated bygen:zh-hant), so the page says the system does not allow sign-in from this network instead of the generic "link expired" sentence. The route ledger note forGET /api/v1/auth/sign-in/directsays so.Item 3, review nit N6. Pins for the exits under
off: another provider row, a social provider and an OIDC provider with credentials, a host sign-in handoff, on the provider delete, the boot report and the settings save.Item 5 (N13). The provider-logout note in
sessionStoragenow holds the time AND the return path (createAuthClient.signOutpassesresolveSpaRoute('/login'), the sign-out's owncallbackURL), andreadSignOutRoundTriphonours it only on a load of that path within the window.AuthProviderstill drops the note on every mount, so a tab whose provider never sent it back drops it unread on the next load of any other page:LoginRedirectthen keeps the deep link's?redirect=.LoginRedirectitself is unchanged. A note in the old bare-number shape reads as no note.Why
An administrator of a self-hosted system with
OS_AUTH_DIRECT_SIGN_IN_LOCAL_PATH=offcould save Google off while it was the last way in, and the page then said "No sign-in method is available" to everyone. A blocked client following the direct sign-in redirect saw a raw JSON body. A provider that never returned the browser made the next deep link in the tab land on the home page.Verification
Final head
e25b4e31. Round 3 (delta review 6894048463) addede25b4e31, a changeset-prose-only commit declaring the email-off save underoffas widened; the changeset gates (no-major, empty-changeset, adr-0087 registration, issue citations, closed-ceremony text, changeset gate self-tests) re-ran exit 0 there. Before that, the review round (review-a FAIL 6893256448) added commit7c6c999con top of10180db4: the changeset re-declared as narrowing, the no-Google email-key pins, the trailing-slash case and the docs sentence. Touched suites, ablations, delta gates and the dogfood battery ran on7c6c999cafter rebuilding the closure; the full suites and the 110-family gate run are fromf76f5856/10180db4(round 1), and no source file changed since, only tests, docs and the changeset.Tests
7c6c999c:sign-in-method-floor.test.ts+direct-sign-in.test.ts: 2 files, 168 passed.pnpm --filter @objectstack/plugin-auth testunder the verify lock: Test Files 277 passed (277), Tests 5481 passed, 10 skipped. After the merge of main (spec check:generatedall 14 up to date): 5 touched files, 210 tests passed.packages/i18n/,apps/console/src/pages/auth/,apps/console/src/components/__tests__,product-neutral-renderer.ratchet: 137 files, 2259 passed, 13 skipped.packages/authsign-out tests: 2 files, 22 passed.pnpm --dir ui exec vitest run scripts/: 171 files passed, 2 skipped.@objectstack/plugin-auth typecheck; turbotype-checkfor@object-ui/auth,@object-ui/i18n(6 tasks) and@object-ui/console(75 tasks), all successful.Ablations (each through scripts/ablation-replace.mjs: anchor 1 to 0 on disk, red, restored, git diff HEAD empty)
Round 2, at
7c6c999c:if (!localOffered && key === 'email_password_enabled') return undefined;→if (false) …: 2 red, both the new pins where nothing else is in force (the composedunder the local sign-in path off, the email and password key is never refused, even with no other way in configured, and the off judge's no-Google case). With Google still in force the old pins stayed green, which was the review's point.method.toUpperCase() === 'GET' &&→true &&inisDirectSignInDoorNavigation: 1 red, thePOSTto the door answers 302 instead of 403.path.startsWith(basePath): 1 red,/api/v1/auth/get-sessionanswers 302 instead of 403.GET /api/v1/auth/sign-in/direct/answers 302 instead of 403 (the new trailing-slash case).this.directSignInDoorMounted &&→true &&in the allow-list middleware: 1 red, the CONTROL with direct sign-in off answers 302 instead of the 403 body.Round 1, at
f76f5856:localOfferedforced true: 2 floor tests red (the composed off save and the off judge).asThePageOffers: false): 1 red (the off judge).IP_NOT_ALLOWEDmap entry renamed inssoCallbackRefusal.ts: 1 red (the page sentence pin).readSignOutRoundTripforced true: 3 red.Gates
7c6c999c: the 48 families of the round-1 list that read the changeset, docs, ADR registration, citations, comments, error codes, the auth mount ledger or skills examples, re-run: 48 exit 0 (check:skill-examplesafter building@objectstack/client-react, its declared prereq).dispatch-gates --commandsderived 110 families; 109 exit 0;check:dual-build-cjs-loadsexit 3 (needs every package built) NOT MEASURED locally and left to CI.pnpm lintexit 0.!and the narrowing arm): PASS at7c6c999c:pnpm --filter @objectstack/dogfood testunder the verify lock, Test Files 467 passed, 3 skipped (470); Tests 3958 passed, 42 skipped (4000); VERDICT command-exit 0 (held 33m41s, shared box).Acceptance notes
off: setting the local path back tohiddenis not enough; setOS_AUTH_EMAIL_PASSWORD_ENABLED=trueas well, then restart.sso.mdx's recovery sentence already says so.Clause-②: yes (narrowing)per claim amendment 6893265267: two answers move (the settings save underofffrom 200 to 400, the blocked door GET from 403 to 302), so the title carries!and the changeset a BREAKING paragraph, an Unchanged paragraph, What to do, and theadr-0087: not-required (no-migration-prescription)marker (no schema key, value or metadata type moves, nothing stored to rewrite). The bump stayspatch, as fix(plugin-auth)!: under local sign-in off, the last identity provider is the last way in; the direct sign-in door keeps ?redirect= #33623 did.content/docs/permissions/sso.mdxgains the 302 sentence in the direct sign-in "No loops" list.content/docs/permissions/authentication.mdx(the allow-list field row) is outside the claim surface and untouched; the sso.mdx sentence links to it.AuthProvider.tsxkeeps its comment that the first mount after the round trip starts raised; that is still true of the return load, so it is untouched.🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jSSVaNcDs8HPSoGV6V